package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class DiscoverLoadRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/Load_Old_DiariesCommentInfo";

    private long ts;

    private int length;

    public long getTs() {
        return ts;
    }

    public void setTs(long ts) {
        this.ts = ts;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        DiscoverLoadRequestBody body = new DiscoverLoadRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setTs(getTs());
        body.setLength(getLength());
        return body;
    }

    private class DiscoverLoadRequestBody extends BaseTokenRequestBody {

        @SerializedName("TS")
        private long ts;

        @SerializedName("PageSize")
        private int length;

        private DiscoverLoadRequestBody() {
            setSv(BaseRequestConfig.SV_GET_OLD_DISCOVER);
        }

        public long getTs() {
            return ts;
        }

        public void setTs(long ts) {
            this.ts = ts;
        }

        public int getLength() {
            return length;
        }

        public void setLength(int length) {
            this.length = length;
        }
    }
}
